﻿<controls:ChildWindow
	x:Class="MVVMtutorial.ChildWindow1"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
	xmlns:me="clr-namespace:MVVMtutorial"
	xmlns:MVVMSL="clr-namespace:Riba.MVVMSL;assembly=RibaMVVMSL"
	Width="300" Height="200"
	Title="ChildWindow1"
>
	<controls:ChildWindow.DataContext>
		<me:ChildWindow1ViewModel />
	</controls:ChildWindow.DataContext>

	<Grid Margin="2">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition />
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="130" />
			<ColumnDefinition />
		</Grid.ColumnDefinitions>

		<MVVMSL:ViewEventHandlerControl />

		<TextBlock Text="ExchangeData" />
		<TextBox Text="{Binding ExchangeData , Mode=TwoWay}" Grid.Column="1" />

		<StackPanel Grid.Row="2" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right">
			<Button
				x:Name="CancelButton" Content="Cancel"
				Click="CancelButton_Click"
				Width="60" Margin="0, 0, 2, 0"
			/>
			<Button
				x:Name="OkButton" Content="OK"
				Command="{Binding CommandOk, Mode=OneWay}"
				Width="60"
			/>
		</StackPanel>
	</Grid>
</controls:ChildWindow>